package webService;

public class TicketWsProxy implements webService.TicketWs {
  private String _endpoint = null;
  private webService.TicketWs ticketWs = null;
  
  public TicketWsProxy() {
    _initTicketWsProxy();
  }
  
  public TicketWsProxy(String endpoint) {
    _endpoint = endpoint;
    _initTicketWsProxy();
  }
  
  private void _initTicketWsProxy() {
    try {
      ticketWs = (new webService.TicketWsServiceLocator()).getTicketWsPort();
      if (ticketWs != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)ticketWs)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)ticketWs)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (ticketWs != null)
      ((javax.xml.rpc.Stub)ticketWs)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public webService.TicketWs getTicketWs() {
    if (ticketWs == null)
      _initTicketWsProxy();
    return ticketWs;
  }
  
  public webService.ImmResponseDataType altaTicket(webService.TicketData arg0, webService.AgencyDataWS arg1) throws java.rmi.RemoteException{
    if (ticketWs == null)
      _initTicketWsProxy();
    return ticketWs.altaTicket(arg0, arg1);
  }
  
  
}